package com.qffx.moviebase.utils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Created by 10908 on 2016/11/6.
 */

public class DiscoverURL {
    //发现--最新  pageContext=1 list分页加载
    //  public static String discoverFirst="http://www.moviebase.cn/uread/app/film/recommendList?pageContext=1&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    public static final String BaseUrl="http://www.moviebase.cn/uread/app/";
    //发现最新
    public static final String NEWEST="film/recommendList?platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";

    public static final String MOVIEINFO="film/filmResource?platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    //User
//点击个人头像 跳转个人界面  个人信息  userId =  "id"      platform=2不知道有什么用
    ///  public static String userInfo="http://www.moviebase.cn/uread/app/user/userDetailMore?platform=2 &resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0 &userId=deaf9d0e534e4daabb59ed23d0a48b34 &deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    public  static String getUserInfo(String id) {
        return "user/userDetailMore?platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&userId=" + id + "&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";

    }

    //个人界面 个人活动展示        userid = "id"  pageContext=1   platform=2    分页加载
    // public static String userFeeds="http://www.moviebase.cn/uread/app/userFeeds/list?pageContext=1&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210 &userid=deaf9d0e534e4daabb59ed23d0a48b34 &versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    public  static String getUserFeeds(String id, String pageContext) {
        return "userFeeds/list?pageContext=" + pageContext + "&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&userid=" + id;

    }

    //影片的具体介绍页面  id
    // public static String filmInfo = "http://www.moviebase.cn/uread/app/film/filmResource?id=AVblI2rnBE2xqBHKFluZ&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    public  static String getFilmInfo(String id) {
        return "film/filmResource?id=" + id + "&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";

    }

    //影片的评论
    //public static String filmComment="http://www.moviebase.cn/uread/app/film/filmResourceComments?pageContext=1&id=AVblI2rnBE2xqBHKFluZ&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    ///  id  影片   pageContext=1
    public  static String getFilmCriticis(String id, String pageContext) {
        return "film/filmResourceComments?pageContext=" + pageContext + "&id=" + id + "&platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";

    }

//关注界面假数据

    //搜索界面
//start =0    20   40  一次显示20条    搜索字段 转换UTF-8
    public static String getSearch(String query, String start) {
        try {
            query = URLEncoder.encode(query, "utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "http://www.moviebase.cn/uread/app/movie/search?platform=2&resolutionWidth=576&sysver=4.2.2&channelId=1004&appVersion=1.7.0&start=" + start + "&query=" + query + "&deviceModel=GT-P5210&versionCode=1070&osType=2&resolutionHeight=1024&deviceId=2A46FA4C00FB1BC24F4F9FDC54B5F2B0";
    }
}